Skip to content

Commit

Permalink
added footer
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibenner committed Aug 6, 2021
1 parent 397ea75 commit ae83113
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 25 deletions.
Binary file added public/fotura_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 2 additions & 12 deletions src/components/three/Viewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { softShadows, useProgress } from "@react-three/drei"
import { softShadows } from "@react-three/drei"
import { Canvas, invalidate } from "@react-three/fiber"
import { Suspense, useEffect, useState } from "react"
import { useSpring } from "react-spring/three"
Expand Down Expand Up @@ -33,22 +33,12 @@ const Viewer = () => {
decrementDecalSize,
incrementDecalSize,
setGl,
setLoadingFinished,
set,
backgroundImage,
} = useStore()
const { active, mode } = useRecorderStore()
const progress = useProgress()

// Set load progress
useEffect(() => {
if (progress.progress === 100) {
setTimeout(() => {
setLoadingFinished(true)
}, 500)
}
}, [progress])

useEffect(() => console.log(decalPath), [decalPath])
// KEYDOWN
useEffect(() => {
function handlekeydownEvent(e) {
Expand Down
8 changes: 0 additions & 8 deletions src/components/three/canvasBackground/CanvasBackground.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import styles from "./canvasBackground.module.css"
import useStore from "../../../states/modelState"
const CanvasBackground = ({ children }) => {
const { loadingFinished } = useStore()
return (
<div className={styles.white_backgdrop}>
<div className={styles.inner}>{children}</div>
{!loadingFinished && (
<img
className={styles.placeholder}
src="/images/placeholder.jpg"
/>
)}
</div>
)
}
Expand Down
13 changes: 11 additions & 2 deletions src/pages/studio/Studio.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export default function Studio() {
return (
<>
<Navbar>
<Button
{/* <Button
text="Donate"
type="filled"
style={{ width: "150px" }}
/>
/> */}
</Navbar>
<div className={styles.wrapper}>
<div className={styles.main}>
Expand All @@ -31,6 +31,15 @@ export default function Studio() {
<ControlPanel />
</div>
</div>
<footer className={styles.footer}>
<img
src="/fotura_logo.jpg"
alt="Fotura Logo"
/>
<div style={{ marginLeft: "10px" }}>
Copyright © 2021 Fotura, Inc. All rights reserved.
</div>
</footer>
</>
)
}
23 changes: 23 additions & 0 deletions src/pages/studio/studio.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,26 @@
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
height: fit-content;
}
.footer {
margin-top: 50px;
width: 100%;
height: 100px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
color: #8c8c8c;
font-size: 0.78em;
}

.footer a {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
}

.footer > img {
width: 25px;
height: 25px;
}
3 changes: 0 additions & 3 deletions src/states/modelState.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const useStore = create((set) => ({
modelColor: "#ffffff",
props: null,
modelRotation: 0,
loadingFinished: false,
set: "bg_color",
text: "TEXT",
setAnimation: (animation) => set((state) => (state.animation = animation)),
Expand Down Expand Up @@ -72,8 +71,6 @@ const useStore = create((set) => ({
setProps: (name) => set((state) => (state.props = name)),
setModelRotation: (rotation) =>
set((state) => (state.modelRotation = rotation)),
setLoadingFinished: (bool) =>
set((state) => (state.loadingFinished = bool)),
setSet: (componentName) => set((state) => (state.set = componentName)),
setText: (text) => set((state) => (state.text = `${text}`)),
}))
Expand Down

0 comments on commit ae83113

Please sign in to comment.