Skip to content

Commit

Permalink
Merge pull request #24 from joshxfi/dev
Browse files Browse the repository at this point in the history
release: v1.0.4 - beta
  • Loading branch information
joshxfi authored Mar 2, 2022
2 parents 1947208 + 42d6271 commit be6798e
Show file tree
Hide file tree
Showing 31 changed files with 904 additions and 939 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"arrow-body-style": "off",
"no-use-before-define": "off",
"no-undef": "off",
"no-plusplus": "off",
"jsx-a11y/anchor-is-valid": "off",
"react/require-default-props": "off",
"react/prop-types": "off",
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "track-as-one",
"version": "0.1.0",
"version": "1.0.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -13,15 +13,16 @@
"prepare": "husky install"
},
"dependencies": {
"@headlessui/react": "^1.4.3",
"firebase": "^9.5.0",
"nanoid": "^3.1.25",
"next": "^12.0.8",
"next-seo": "^4.28.1",
"@headlessui/react": "^1.5.0",
"firebase": "^9.6.7",
"nanoid": "^3.3.1",
"next": "^12.1.0",
"next-seo": "^5.1.0",
"nprogress": "^0.2.0",
"react": "17.0.2",
"react-datepicker": "^4.2.1",
"react-datepicker": "^4.7.0",
"react-dom": "17.0.2",
"react-firebase-hooks": "^5.0.3",
"react-hot-toast": "^2.2.0",
"react-icons": "^4.3.1"
},
Expand Down
55 changes: 2 additions & 53 deletions pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,60 +1,9 @@
import React, { ReactElement } from 'react';

import { Layout } from '@/components';
import { aboutPage } from '@/utils/constants';
import { NextPageWithLayout } from '@/types/page';
import { Layout, UnderConstruction } from '@/components';

const About: NextPageWithLayout = () => {
const version = process.env.NEXT_PUBLIC_VERSION;

return (
<>
<div className='flex space-x-2'>
<h2>{version}</h2>
<a
className='text-blue-500'
href={`https://github.com/joshxfi/trackAsOne/releases/tag/${version}`}
target='_blank'
rel='noreferrer noopener'
>
View Changelog
</a>
</div>

<hr className='my-6' />

<section className='space-y-12'>
<div>
<h1 className='about-h1'>Why Build This?</h1>
<p>{aboutPage.body1}</p>
</div>

<div>
<h1 className='about-h1'>Future Updates</h1>
<ul>
{aboutPage.body2.map((update) => (
<li key={update}>{update}</li>
))}
</ul>
</div>

<div>
<h1 className='about-h1'>License</h1>
<p>
This project is licensed under{' '}
<a
className='text-blue-500'
target='_blank'
rel='noopener noreferrer'
href='https://github.com/joshxfi/trackAsOne/blob/main/LICENSE'
>
MIT
</a>
</p>
</div>
</section>
</>
);
return <UnderConstruction />;
};

About.getLayout = (page: ReactElement) => (
Expand Down
57 changes: 2 additions & 55 deletions pages/contact.tsx
Original file line number Diff line number Diff line change
@@ -1,62 +1,9 @@
import React, { ReactElement } from 'react';

import { Layout } from '@/components';
import { NextPageWithLayout } from '@/types/page';
import { Layout, UnderConstruction } from '@/components';

const Contact: NextPageWithLayout = () => {
return (
<>
<h2>Want to contribute in the project?</h2>

<hr className='my-6' />

<section className='space-y-12'>
<div>
<h1 className='about-h1'>Bug Report & Feature Request</h1>
<ul>
<li>
▸ Open an Issue on{' '}
<a
className='text-blue-500'
href='https://github.com/joshxfi/trackAsOne/issues'
target='_blank'
rel='noopener noreferrer'
>
GitHub
</a>
</li>

<li>
▸ Email me:
<a className='text-blue-500' href='mailto:[email protected]'>
{' '}
[email protected]
</a>
</li>

<li>▸ DM me on Discord: !xfi#1387</li>

<li>▸ Know me IRL? Contact me on Facebook</li>
</ul>
</div>

<div>
<h1 className='about-h1'>Contributing</h1>
<div>
▸ More info on the{' '}
<a
className='text-blue-500'
href='https://github.com/joshxfi/trackAsOne#contributing'
target='_blank'
rel='noopener noreferrer'
>
repository &rarr;
</a>
</div>
</div>
</section>
</>
);
return <UnderConstruction />;
};

Contact.getLayout = (page: ReactElement) => (
Expand Down
2 changes: 1 addition & 1 deletion pages/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Create: NextPageWithLayout = () => {
};

setRoomName('');
if (roomsCreated.length >= 3) {
if (roomsCreated && roomsCreated.length >= 3) {
toast.error('max rooms reached (3)');
} else if (roomName) {
toast.promise(setDoc(doc(db, 'rooms', roomId), payload), {
Expand Down
11 changes: 3 additions & 8 deletions pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Image from 'next/image';

import { Layout } from '@/components';
import { db } from '@/config/firebase';
import { useCollection } from '@/hooks';
import { useCol } from '@/hooks';
import { MyRooms } from '@/components/Home';
import { defaultPic } from '@/utils/constants';
import { Button } from '@/components/Button';
Expand All @@ -20,16 +20,11 @@ const Homepage: React.FC = () => {
const { push } = useRouter();
const {
data: { id, username, photoURL },
loading,
} = useAuth();

const roomRef = collection(db, 'rooms');
const deps = { deps: [loading] };

const [createdRooms, crLoading] = useCreatedRooms(id);
const [joinedRooms, jrLoading] = useCollection<IRoom>(
query(roomRef, where('members', 'array-contains', id ?? '')),
deps
const [joinedRooms, jrLoading] = useCol<IRoom>(
query(collection(db, 'rooms'), where('members', 'array-contains', id ?? ''))
);

const copyTag = () => {
Expand Down
2 changes: 1 addition & 1 deletion pages/invites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Layout, Header, EmptyMsg } from '@/components';

const Invites: React.FC = () => {
const { data } = useAuth();
const [user, loading] = useUser(data.id, true);
const [user, loading] = useUser(data.id);

return (
<Layout loaders={[loading]}>
Expand Down
Loading

1 comment on commit be6798e

@vercel
Copy link

@vercel vercel bot commented on be6798e Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.