Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ed1 55 refactor head.tsx files #69

Merged
merged 15 commits into from
Jan 28, 2024
7 changes: 5 additions & 2 deletions apps/app/src/app/(combo)/(legal)/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';
import { privacyPolicy } from './privacyPolicy';
import { Metadata } from 'next';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - Privacy Policy',
};

export default function PrivacyPolicy({}: Props) {
export default function PrivacyPolicy() {
return (
<>
<h1>PrivacyPolicy</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';
import { termsAndConditions } from './termsAndConditions';
import { Metadata } from 'next';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - terms and conditions',
};

export default function TermsAndCoonditions({}: Props) {
export default function TermsAndCoonditions() {
return (
<>
<h1>TermsAndCoonditions</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, { useContext } from 'react';
export const CreateEventButton = () => {
const { currentUser } = useContext(CurrUserContext);
return currentUser?.customClaims.type === 'business' ? (
<Link href={'/events/create'} className='btn'>
<Link href={'/events/create'} className='btn btn-neutral'>
Create Event
</Link>
) : null;
Expand Down
5 changes: 5 additions & 0 deletions apps/app/src/app/(protected)/events/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Metadata } from 'next';
import { CreateEventForm } from './form';

export const metadata: Metadata = {
title: 'Event Dee - Create Event',
};

export default function CreateEvent() {
return (
<div className='flex flex-col gap-4 w-full'>
Expand Down
6 changes: 6 additions & 0 deletions apps/app/src/app/(protected)/events/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Event Dee - Events',
};

export default function EventsLayout({ children }: { children: React.ReactNode }) {
return <div className='w-full'>{children}</div>;
}
5 changes: 5 additions & 0 deletions apps/app/src/app/(protected)/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { PhotoForm } from './components/photo-form';
import { EditProfileForm } from './components/form';
import { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Event Dee - Profile',
};

/*
* This is the Profile page as seen from the user's perspective with edittable fields
Expand Down
7 changes: 5 additions & 2 deletions apps/app/src/app/(protected)/search/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Metadata } from 'next';
import React from 'react';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - Search',
};

export default function SearchPage(props: Props) {
export default function SearchPage() {
return <div>SearchPage</div>;
}
7 changes: 5 additions & 2 deletions apps/app/src/app/(protected)/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { ChangePasswordForm } from './components/change-pw-form';
import { DeleteAccountForm } from './components/delete-acc-form';
import { Metadata } from 'next';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - Settings',
};

export default function SettingsPage(props: Props) {
export default function SettingsPage() {
return (
<div className='flex flex-col gap-4 w-full'>
<h1 className='text-3xl'>Account Settings</h1>
Expand Down
6 changes: 2 additions & 4 deletions apps/app/src/app/(public)/(auth)/login/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import { auth } from '__firebase/clientApp';
import { styles } from '__styles/styles';
import { FormError } from 'ui';

type Props = {};

export const LoginForm = (props: Props) => {
export const LoginForm = () => {
const [form, setForm] = useState({
email: '',
password: '',
Expand Down Expand Up @@ -68,7 +66,7 @@ export const LoginForm = (props: Props) => {
}
/>
) : null}
<button className='btn w-full max-w-xs' type='submit'>
<button className='btn btn-neutral w-full max-w-xs' type='submit'>
Log in
</button>
</div>
Expand Down
15 changes: 6 additions & 9 deletions apps/app/src/app/(public)/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
'use client';

import LoginLeft from './left/LoginLeft';
import LoginRight from './LoginRight';
import { DividedPage } from '../components/DividedPage';
import { Metadata } from 'next';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - Login',
};

function Login({}: Props) {
return (
<>
<DividedPage left={<LoginLeft />} right={<LoginRight />} leftColor='secondary' />
</>
);
function Login() {
return <DividedPage left={<LoginLeft />} right={<LoginRight />} leftColor='secondary' />;
}

export default Login;
9 changes: 4 additions & 5 deletions apps/app/src/app/(public)/(auth)/signup/business/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Metadata } from 'next';
import { SignupBusinessLeft } from './SignupBusinessLeft/SignupBusinessLeft';
import {SignupBusinessRight} from './SignupBusinessRight/SignupBusinessRight';
import { SignupBusinessRight } from './SignupBusinessRight/SignupBusinessRight';

type Props = {};

function SignupBusiness({}: Props) {
function SignupBusiness() {
return (
// <DividedPage left={<SignupMemberLeft />} right={<SignupMemberRight />} leftColor='secondary' />
<div className='flex min-h-screen'>
Expand All @@ -13,4 +12,4 @@ function SignupBusiness({}: Props) {
);
}

export default SignupBusiness;
export default SignupBusiness;
4 changes: 1 addition & 3 deletions apps/app/src/app/(public)/(auth)/signup/freelancer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { SignupMemberLeft } from './signup-member-left/SignupMemberLeft';
import { SignupMemberRight } from './signup-member-right/SignupMemberRight';
import { DividedPage } from '../../components/DividedPage';

type Props = {};

function SignupFreelancer({}: Props) {
function SignupFreelancer() {
return (
// <DividedPage left={<SignupMemberLeft />} right={<SignupMemberRight />} leftColor='secondary' />
<div className='flex min-h-screen'>
Expand Down
7 changes: 5 additions & 2 deletions apps/app/src/app/(public)/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Metadata } from 'next';
import Link from 'next/link';
import React from 'react';

type Props = {};
export const metadata: Metadata = {
title: 'Event Dee - Signup',
};

// Th9is page could ask if user wants to signuo as freelancer or company and procide links. Or it ciuld be deleted.

function Signup({}: Props) {
function Signup() {
return (
<section className='min-h-screen flex-center bg-primary/20 text-3xl'>
<p>
Expand Down
7 changes: 1 addition & 6 deletions apps/app/src/app/(public)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { CurrentUserProvider } from 'app/(protected)/components/Providers/CurrentUserProvider';
import { PublicRoutes } from './PublicRoutes';

export default function PublicLayout({ children }: { children: React.ReactNode }) {
return (
// <CurrentUserProvider>
<PublicRoutes>{children}</PublicRoutes>
// </CurrentUserProvider>
);
return <PublicRoutes>{children}</PublicRoutes>;
}
15 changes: 0 additions & 15 deletions apps/app/src/app/head.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion apps/app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { Varela } from 'next/font/google';

import { RecoilProvider } from '../components/RecoilProvider';
import '../styles/globals.scss';
import { Metadata } from 'next';

const varela = Varela({
weight: ['400'],
subsets: ['latin'],
});

export const metadata = {
export const metadata: Metadata = {
title: 'Event Dee - App',
description: 'Connecting events',
icons: {
Expand Down
15 changes: 0 additions & 15 deletions apps/landing/src/app/head.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/landing/src/components/Header/HeaderRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function HeaderRight({}: Props) {
<>
<div className='flex gap-2 navbar-end'>
{/* <Link role='button' href={'signup/business'} className='btn btn-sm rounded-3xl normal-case'> */}
<Link role='button' href={appUrl} target='_blank' className='btn btn-sm rounded-3xl normal-case'>
<Link role='button' href={appUrl} target='_blank' className='btn btn-neutral btn-sm rounded-3xl normal-case'>
Hire Talent
</Link>
</div>
Expand Down
16 changes: 8 additions & 8 deletions apps/landing/src/components/Header/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import React from 'react';

import Link from 'next/link';
import { RiArrowDropDownLine } from 'react-icons/ri';

import { menuItems } from './menuItems';
import Link from 'next/link';
import { appUrl } from '../../consts';

type Props = {};

function NavBar({}: Props) {
return (
<nav className='navbar-center hidden md:flex'>
<ul className='menu menu-horizontal px-1'>
<ul className='menu menu-horizontal items-center px-1'>
{menuItems.map(item =>
item.subItems ? (
<li tabIndex={0} key={item.title}>
<a>
<li tabIndex={0} key={item.title} className='dropdown dropdown-hover'>
<a tabIndex={0} role='button'>
{item.title} <RiArrowDropDownLine />
</a>
<ul className='p-2 bg-base-100'>
<ul
tabIndex={0}
className='dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52'>
{item.subItems.map(subItem => (
<li key={subItem.title}>
<Link href={subItem.link}>{subItem.title}</Link>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/forms/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ActionButton = ({ text, onClick, loading, disabled = false, classNa

return (
<button
className={`btn w-full max-w-xs mx-auto flex-center ${className}`}
className={`btn btn-neutral w-full max-w-xs mx-auto flex-center ${className}`}
{...buttonProps}
disabled={disabled}>
{loading ? <PulseLoader color={colorMap.white} size={8} speedMultiplier={0.5} /> : text}
Expand Down
Loading