Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit fff7f9a

Browse files
committed
fixed some issues which occurred during build
1 parent fb24ebc commit fff7f9a

File tree

10 files changed

+10
-12
lines changed

10 files changed

+10
-12
lines changed

src/components/buttons/GithubButton.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@ import React from "react";
22
import styled from "styled-components";
33
import { FaGithub } from "react-icons/all";
44
import { useHistory } from "react-router-dom";
5-
import useThemeContext from "@theme/hooks/useThemeContext";
65

76
export type Props = { to: string };
87

98
const GithubButton: React.FC<Props> = (props) => {
109
const { to } = props;
1110
const history = useHistory();
12-
const { isDarkTheme } = useThemeContext();
1311

1412
return (
1513
<Container
16-
isDarkTheme={isDarkTheme}
1714
onClick={() => {
1815
if (to.startsWith("http")) {
1916
window.location.href = to;
@@ -35,7 +32,7 @@ const Icon = styled(FaGithub)`
3532
margin-right: 5px;
3633
`;
3734

38-
const Container = styled.button<{ isDarkTheme: boolean }>`
35+
const Container = styled.button`
3936
color: var(--ifm-surface-text-color);
4037
background-color: var(--ifm-surface-background-color);
4138
@@ -57,7 +54,12 @@ const Container = styled.button<{ isDarkTheme: boolean }>`
5754
transition: 0.3s ease all;
5855
5956
&:hover {
60-
color: ${(props) => (props.isDarkTheme ? "#000000" : "#ffffff")};
61-
background-color: ${(props) => (props.isDarkTheme ? "#ebe2fc" : "#1c1122")};
57+
[data-theme="dark"] {
58+
color: #000000;
59+
background-color: #ebe2fc;
60+
}
61+
62+
color: #ffffff;
63+
background-color: #1c1122;
6264
}
6365
`;

src/pages/LandingPage/components/HeaderView/components/HeaderTyper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import { AutoTyper } from "./AutoTyper";
2+
import { AutoTyper } from "../../../../../../core/other/AutoTyper";
33
import styled from "styled-components";
44

55
export type Props = {

src/pages/LandingPage/components/HeaderView/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import useThemeContext from "@theme/hooks/useThemeContext";
88

99
const HeaderView: React.FC = () => {
1010
const { siteConfig } = useDocusaurusContext();
11-
const { isDarkTheme } = useThemeContext();
1211

1312
return (
1413
<Container>
@@ -39,9 +38,7 @@ const HeaderView: React.FC = () => {
3938
<GithubButtonContainer to={siteConfig.customFields.githubUrl} />
4039
</ButtonContainer>
4140
</ContentContainer>
42-
<AstronautImage
43-
src={`../../static/img/astronaut-${isDarkTheme ? "light" : "dark"}.svg`}
44-
/>
41+
<AstronautImage src={`../../static/img/astronaut-${"light"}.svg`} />
4542
</Container>
4643
);
4744
};

src/pages/LandingPage/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useWindowSize } from "../../hooks/useWindowSize";
44
import Layout from "@theme/Layout";
55

66
import "react-toastify/dist/ReactToastify.css";
7-
import GiveItATryView from "./components/GiveItATriyView";
87
import HeaderView from "./components/HeaderView";
98
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
109

0 commit comments

Comments
 (0)