Skip to content

Commit

Permalink
chore: specify page routes to handle test files while building
Browse files Browse the repository at this point in the history
  • Loading branch information
ijemmao committed Mar 24, 2024
1 parent 82c4d26 commit fb6ed0f
Show file tree
Hide file tree
Showing 15 changed files with 628 additions and 717 deletions.
1 change: 1 addition & 0 deletions functions/next.config.js
Expand Up @@ -9,5 +9,6 @@ const withNextra = nextra({
module.exports = withNextra({
distDir: 'dist',
generateBuildId: async () => 'api-homepage',
pageExtensions: ['page.tsx'],
i18n,
});
1 change: 1 addition & 0 deletions next.config.js
Expand Up @@ -9,5 +9,6 @@ const withNextra = nextra({
module.exports = withNextra({
distDir: 'dist',
generateBuildId: async () => 'api-homepage',
pageExtensions: ['page.tsx'],
i18n,
});
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -6,8 +6,8 @@
"main": "server.js",
"scripts": {
"build": "rm -rf dist/ && npm run build:site && npm run build:src",
"build:functions": "rm -rf functions/src && shx cp -r ./dist ./functions && shx cp -r ./dist/src/dictionaries/ig-en ./functions/dictionaries",
"build:src": "tsc && cross-env NODE_ENV=build npm run build:dictionaries && npm run build:functions",
"build:functions": "rm -rf functions/src && shx cp -r ./dist ./functions && shx cp -r ./dist/src/dictionaries/ig-en ./functions/dictionaries",
"build:dictionaries:ig:en": "[ ! -d \"./dist/src/dictionaries\" ] && shx mkdir ./dist/src/dictionaries || echo '' && [ ! -d \"./dist/src/dictionaries/ig-en\" ] && shx mkdir ./dist/src/dictionaries/ig-en || echo 'Igbo to English dictionaries dir already exists'",
"build:dictionaries:en:ig": "[ ! -d \"./dist/src/dictionaries\" ] && shx mkdir ./dist/src/dictionaries || echo '' && [ ! -d \"./dist/src/dictionaries/en-ig\" ] && shx mkdir ./dist/src/dictionaries/en-ig || echo 'English to Igbo dictionaries dir already exists'",
"build:dictionaries:nsibidi": "[ ! -d \"./dist/src/dictionaries\" ] && shx mkdir ./dist/src/dictionaries || echo '' && [ ! -d \"./dist/src/dictionaries/nsibidi\" ] && shx mkdir ./dist/src/dictionaries/nsibidi || echo 'Nsibidi dictionary dir already exists'",
Expand Down
1 change: 1 addition & 0 deletions src/middleware/validateUpdateDeveloperBody.ts
Expand Up @@ -4,6 +4,7 @@ import { MiddleWare } from '../types';
const developersJoiSchema = Joi.object().keys({
firebaseId: Joi.string().required(),
email: Joi.string().allow('', null).optional(),
displayName: Joi.string().allow('', null).optional(),
});

const validateUpdateDeveloperBody: MiddleWare = (req, res, next) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/pages/about.tsx → src/pages/about/index.page.tsx
@@ -1,9 +1,9 @@
import React from 'react';
import { Box, Heading, Text, Link, chakra } from '@chakra-ui/react';
import { FiMail } from 'react-icons/fi';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import { DICTIONARY_APP_URL } from '../siteConstants';
import Navbar from '../components/Navbar';
import Footer from '../components/Footer';
import { DICTIONARY_APP_URL } from '../../siteConstants';

const About = () => (
<Box className="flex flex-col items-center h-screen">
Expand Down
File renamed without changes.
File renamed without changes.
269 changes: 130 additions & 139 deletions src/pages/privacy.tsx → src/pages/privacy/index.page.tsx

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/pages/signup.tsx → src/pages/signup/index.page.tsx
Expand Up @@ -5,10 +5,10 @@ import { createUserWithEmailAndPassword } from 'firebase/auth';
import { useRouter } from 'next/router';
import { useForm, Controller, FieldValues } from 'react-hook-form';
import Login from './login';
import Navbar from './components/Navbar';
import Input from './components/Input';
import { auth } from '../services/firebase';
import { postDeveloper } from './APIs/DevelopersAPI';
import Navbar from '../components/Navbar';
import Input from '../components/Input';
import { auth } from '../../services/firebase';
import { postDeveloper } from '../APIs/DevelopersAPI';

enum AuthState {
SIGNING_IN,
Expand Down
6 changes: 3 additions & 3 deletions src/pages/login.tsx → src/pages/signup/login.tsx
Expand Up @@ -3,9 +3,9 @@ import { useRouter } from 'next/router';
import { signInWithPopup, GoogleAuthProvider } from 'firebase/auth';
import Image from 'next/image';
import { Box, Button } from '@chakra-ui/react';
import { auth } from '../services/firebase';
import getAWSAsset from './utils/getAWSAsset';
import { putDeveloper } from './APIs/DevelopersAPI';
import { auth } from '../../services/firebase';
import getAWSAsset from '../utils/getAWSAsset';
import { putDeveloper } from '../APIs/DevelopersAPI';

const provider = new GoogleAuthProvider();

Expand Down
567 changes: 0 additions & 567 deletions src/pages/terms.tsx

This file was deleted.

484 changes: 484 additions & 0 deletions src/pages/terms/index.page.tsx

Large diffs are not rendered by default.

0 comments on commit fb6ed0f

Please sign in to comment.