From 7800dd4f042e390477dd02e48df66ec7098e6322 Mon Sep 17 00:00:00 2001 From: billycougz Date: Fri, 9 Jun 2023 20:01:34 -0400 Subject: [PATCH] Another concepts file reorg --- gatsby-node.js | 4 ++-- src/{pages/concepts/index.js => concepts-config.js} | 10 +++++----- src/pages/{concepts => }/ConceptTemplate.js | 8 ++++---- src/pages/{concepts => }/DayAndNite.js | 0 src/pages/{concepts => }/FlappyTanooki.js | 2 +- src/pages/{concepts => }/StartScreen.js | 8 ++++---- src/pages/index.js | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) rename src/{pages/concepts/index.js => concepts-config.js} (51%) rename src/pages/{concepts => }/ConceptTemplate.js (84%) rename src/pages/{concepts => }/DayAndNite.js (100%) rename src/pages/{concepts => }/FlappyTanooki.js (98%) rename src/pages/{concepts => }/StartScreen.js (95%) diff --git a/gatsby-node.js b/gatsby-node.js index de4a475..c82f961 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -1,9 +1,9 @@ exports.createPages = async ({ actions }) => { - const conceptIds = ['flappy-tanooki', 'day-and-nite']; + const conceptIds = ['Flappy-Tanooki', 'Day-And-Nite']; conceptIds.forEach((id) => { actions.createPage({ path: `/concept/${id}`, - component: require.resolve('./src/pages/concepts/ConceptTemplate.js'), + component: require.resolve('./src/pages/ConceptTemplate.js'), context: { id, }, diff --git a/src/pages/concepts/index.js b/src/concepts-config.js similarity index 51% rename from src/pages/concepts/index.js rename to src/concepts-config.js index 1f81c0f..125dcf3 100644 --- a/src/pages/concepts/index.js +++ b/src/concepts-config.js @@ -1,6 +1,6 @@ -import DayAndNite from './DayAndNite'; -import FlappyTanooki from './FlappyTanooki'; -import StartScreen from './StartScreen'; +import DayAndNite from './pages/DayAndNite'; +import FlappyTanooki from './pages/FlappyTanooki'; +import StartScreen from './pages/StartScreen'; export default [ { @@ -9,12 +9,12 @@ export default [ component: StartScreen, }, { - id: 'flappy-tanooki', + id: 'Flappy-Tanooki', name: 'Flappy Tanooki', component: FlappyTanooki, }, { - id: 'day-and-nite', + id: 'Day-And-Nite', name: `Day And Nite`, component: DayAndNite, }, diff --git a/src/pages/concepts/ConceptTemplate.js b/src/pages/ConceptTemplate.js similarity index 84% rename from src/pages/concepts/ConceptTemplate.js rename to src/pages/ConceptTemplate.js index d8bc9b4..bcd288f 100644 --- a/src/pages/concepts/ConceptTemplate.js +++ b/src/pages/ConceptTemplate.js @@ -1,9 +1,9 @@ import React from 'react'; -import Layout from '../../components/layout'; -import Menu from '../../components/Menu'; +import Layout from '../components/layout'; +import Menu from '../components/Menu'; import { navigate } from 'gatsby'; -import { SEO } from '../../components/seo'; -import Concepts from '.'; +import { SEO } from '../components/seo'; +import Concepts from '../concepts-config'; /** * Template that renders the applicable concept component diff --git a/src/pages/concepts/DayAndNite.js b/src/pages/DayAndNite.js similarity index 100% rename from src/pages/concepts/DayAndNite.js rename to src/pages/DayAndNite.js diff --git a/src/pages/concepts/FlappyTanooki.js b/src/pages/FlappyTanooki.js similarity index 98% rename from src/pages/concepts/FlappyTanooki.js rename to src/pages/FlappyTanooki.js index 1900e02..00ea9ca 100644 --- a/src/pages/concepts/FlappyTanooki.js +++ b/src/pages/FlappyTanooki.js @@ -1,7 +1,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { withPrefix } from 'gatsby'; import styled from 'styled-components'; -import MarioCurtainImg from '../../assets/mario-curtain.png'; +import MarioCurtainImg from '../assets/mario-curtain.png'; const Container = styled.div` background: url(${MarioCurtainImg}); diff --git a/src/pages/concepts/StartScreen.js b/src/pages/StartScreen.js similarity index 95% rename from src/pages/concepts/StartScreen.js rename to src/pages/StartScreen.js index 4c2ad3d..38d0ca1 100644 --- a/src/pages/concepts/StartScreen.js +++ b/src/pages/StartScreen.js @@ -1,7 +1,7 @@ import * as React from 'react'; import styled from 'styled-components'; -import COIN_SOUND_IMPORT from '../../assets/coin-sound.mp3'; -import Marquee from '../../components/Marquee'; +import COIN_SOUND_IMPORT from '../assets/coin-sound.mp3'; +import Marquee from '../components/Marquee'; import { Link } from 'gatsby'; const Container = styled.div` @@ -162,8 +162,8 @@ const DefaultOptions = ({ setOptions } = {}) => ( const ConceptOptions = ({ setOptions }) => ( <> - 1 FLAPPY TANOOKI - 2 DAY AND NITE + 1 FLAPPY TANOOKI + 2 DAY AND NITE setOptions(() => DefaultOptions)}>← MAIN MENU ); diff --git a/src/pages/index.js b/src/pages/index.js index 94f7716..e13034b 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import StartScreen from './concepts/StartScreen'; +import StartScreen from './StartScreen'; import Layout from '../components/layout'; import { SEO } from '../components/seo';