Skip to content

Commit

Permalink
Test/cd 2 (#18)
Browse files Browse the repository at this point in the history
* fix fb api key env var

* update path to public folder

* cleanup app
  • Loading branch information
AndyOooh authored Jun 4, 2023
1 parent a1f6042 commit 7ae6ef0
Show file tree
Hide file tree
Showing 23 changed files with 68 additions and 25 deletions.
14 changes: 14 additions & 0 deletions apps/app/src/app/(combo)/(legal)/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { privacyPolicy } from './privacyPolicy';

type Props = {};

export default function PrivacyPolicy({}: Props) {
return (
<>
<h1>PrivacyPolicy</h1>
<p>{privacyPolicy.dateText}</p>
<p>{privacyPolicy.title}</p>
</>
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Not sure how to do this best
const privacyPolicy = {
export const privacyPolicy = {
dateText: 'Effective Sep 30, 2022',
title: 'Teamway - Terms and Conditions',
title: 'Event Dee - Terms and Conditions',
}
22 changes: 22 additions & 0 deletions apps/app/src/app/(combo)/(legal)/terms-and-conditions/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { termsAndConditions } from './termsAndConditions';

type Props = {};

export default function TermsAndCoonditions({}: Props) {
return (
<>
<h1>TermsAndCoonditions</h1>
<p>{termsAndConditions.dateText}</p>
<p>{termsAndConditions.title}</p>
<p>{termsAndConditions.intro}</p>
{termsAndConditions.paragraphs.map((paragraph, index) => (
<>
<p key={index}>{paragraph.number}</p>
<p key={index}>{paragraph.title}</p>
<p key={index}>{paragraph.text}</p>
</>
))}
</>
);
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Not sure how to do this best

const termsAndConditions = {
export const termsAndConditions = {
dateText: 'Effective Sep 30, 2022',
title: 'Teamway - Terms and Conditions',
intro: 'text',
paragraphs: {
number: 1,
title: 'Definitions',
text: 'lala',
},
paragraphs: [
{
number: 1,
title: 'Definitions',
text: 'lala',
},
],
};
4 changes: 2 additions & 2 deletions apps/app/src/app/(combo)/companies/[companyName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = {};

// Check if logged in and show page based on that similar to fb!

export const CompanyProfile = (props: Props) => {
export default function CompanyProfile(props: Props) {
const [user, loading, error] = useAuthState(auth);

return loading ? <LoaderSpinner /> : user ? <AuthCompanyProfile /> : <PublicCompanyProfile />;
};
}
12 changes: 9 additions & 3 deletions apps/app/src/app/(combo)/freelancers/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ type Props = {};

// Check if logged in and show page based on that similar to fb!

export const CompanyProfile = (props: Props) => {
export default function FreelancerProfile(props: Props) {
const [user, loading, error] = useAuthState(auth);

return loading ? <LoaderSpinner /> : user ? <AuthFreelancerProfile /> : <PublicFreelancerProfile />;
};
return loading ? (
<LoaderSpinner />
) : user ? (
<AuthFreelancerProfile />
) : (
<PublicFreelancerProfile />
);
}
4 changes: 2 additions & 2 deletions apps/app/src/components/modals/ModalWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type ModalWrapperProps = {
className?: string;
};

function ModalWrapper({ children, visible, setVisible, className }: ModalWrapperProps) {
export const ModalWrapper = ({ children, visible, setVisible, className }: ModalWrapperProps) => {
const [mounted, setMounted] = useState(false);
const divRef = useRef<HTMLDivElement>();
const modalref = useRef(null);
Expand Down Expand Up @@ -39,6 +39,6 @@ function ModalWrapper({ children, visible, setVisible, className }: ModalWrapper
)}
</>
) : null;
}
};

export default ModalWrapper;
4 changes: 2 additions & 2 deletions apps/app/src/components/modals/auth/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Props = {
toggleView: ToggleView;
};

function ResetPassword({ toggleView }: Props) {
export const ResetPassword = ({ toggleView }: Props) => {
const setAuthModalState = useSetRecoilState(authModalState);
const [email, setEmail] = useState('');
const [success, setSuccess] = useState(false);
Expand Down Expand Up @@ -71,6 +71,6 @@ function ResetPassword({ toggleView }: Props) {
)}
</div>
);
}
};

export default ResetPassword;
10 changes: 5 additions & 5 deletions apps/app/src/components/modals/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { useRecoilState } from 'recoil';
import { RiCloseCircleFill } from 'react-icons/ri';

import { authModalState } from '../../../atoms/authModalAtom';
import ModalWrapper from '../ModalWrapper';
import OAuthButtons from './OAuthButtons';
import AuthInputs from './inputs';
import ResetPassword from './ResetPassword';
import { ModalWrapper } from '../ModalWrapper';
import { OAuthButtons } from './OAuthButtons';
import { AuthInputs } from './inputs';
import { ResetPassword } from './ResetPassword';
import { useAuthState } from 'react-firebase-hooks/auth';
import { auth } from '../../../firebase/clientApp';
import { useEffect } from 'react';
Expand Down Expand Up @@ -58,7 +58,7 @@ function AuthModal() {
<div className='flex flex-col gap-4 w-full'>
{modalState.view === 'login' || modalState.view === 'signup' ? (
<>
<OAuthButtons view={modalState.view} />
<OAuthButtons />
OR
<AuthInputs toggleView={handleChangeView} />
</>
Expand Down
5 changes: 2 additions & 3 deletions apps/app/src/components/modals/auth/inputs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Props = {
toggleView: ToggleView;
};

function AuthInputs({ toggleView }: Props) {
export const AuthInputs = ({ toggleView }: Props) => {
const modalState = useRecoilValue(authModalState);
return (
<div className='flex flex-col w-full justify-center items-center'>
Expand All @@ -22,6 +22,5 @@ function AuthInputs({ toggleView }: Props) {
)}
</div>
);
}
};

export default AuthInputs;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7ae6ef0

Please sign in to comment.