feat: Simplify home page and remove tracking form
- Remove complex tracking form from home page
- Replace with clean 'Analyze URL Redirects' call-to-action button
- Remove announcement badge '🚀 URL Tracker Tool V2 - Now Available'
- Clean up unused imports and form-related code
- Direct users to dedicated /track page for full functionality
- Improve user experience with cleaner, more focused home page
Changes:
- Simplified HomePage component with single CTA button
- Removed form validation, mutation handling, and result display
- Maintained all tracking functionality on /track page
- Professional appearance without promotional clutter
This commit is contained in:
49
apps/api/dist/routes/tracking.routes.js
vendored
49
apps/api/dist/routes/tracking.routes.js
vendored
@@ -7,6 +7,7 @@ const express_1 = __importDefault(require("express"));
|
||||
const zod_1 = require("zod");
|
||||
const express_rate_limit_1 = __importDefault(require("express-rate-limit"));
|
||||
const redirect_tracker_service_1 = require("../services/redirect-tracker.service");
|
||||
const prisma_1 = require("../lib/prisma");
|
||||
const auth_middleware_1 = require("../middleware/auth.middleware");
|
||||
const logger_1 = require("../lib/logger");
|
||||
const router = express_1.default.Router();
|
||||
@@ -77,11 +78,55 @@ router.post('/track', auth_middleware_1.optionalAuth, async (req, res) => {
|
||||
if (req.user) {
|
||||
const userMembership = req.user.memberships[0];
|
||||
if (userMembership) {
|
||||
validatedData.projectId = 'default-project';
|
||||
const defaultProject = await prisma_1.prisma.project.findFirst({
|
||||
where: {
|
||||
orgId: userMembership.orgId
|
||||
}
|
||||
});
|
||||
if (defaultProject) {
|
||||
validatedData.projectId = defaultProject.id;
|
||||
}
|
||||
else {
|
||||
const newProject = await prisma_1.prisma.project.create({
|
||||
data: {
|
||||
name: 'Default Project',
|
||||
orgId: userMembership.orgId,
|
||||
settingsJson: {}
|
||||
}
|
||||
});
|
||||
validatedData.projectId = newProject.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
validatedData.projectId = 'anonymous-project';
|
||||
let anonymousProject = await prisma_1.prisma.project.findFirst({
|
||||
where: {
|
||||
name: 'Anonymous Tracking'
|
||||
}
|
||||
});
|
||||
if (!anonymousProject) {
|
||||
let anonymousOrg = await prisma_1.prisma.organization.findFirst({
|
||||
where: {
|
||||
name: 'Anonymous Users'
|
||||
}
|
||||
});
|
||||
if (!anonymousOrg) {
|
||||
anonymousOrg = await prisma_1.prisma.organization.create({
|
||||
data: {
|
||||
name: 'Anonymous Users',
|
||||
plan: 'free'
|
||||
}
|
||||
});
|
||||
}
|
||||
anonymousProject = await prisma_1.prisma.project.create({
|
||||
data: {
|
||||
name: 'Anonymous Tracking',
|
||||
orgId: anonymousOrg.id,
|
||||
settingsJson: {}
|
||||
}
|
||||
});
|
||||
}
|
||||
validatedData.projectId = anonymousProject.id;
|
||||
}
|
||||
}
|
||||
const userId = req.user?.id || 'anonymous-user';
|
||||
|
||||
Reference in New Issue
Block a user