Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/components/StatErrorMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from "react"
import { TypographyProps } from "styled-system"
import { Text, TextProps } from "@chakra-ui/react"

import Translation from "./Translation"
import { IndicatorSpan } from "./StatLoadingMessage"

export interface IProps extends TypographyProps {}
export interface IProps extends TextProps {}

const StatErrorMessage: React.FC<IProps> = (props) => (
<IndicatorSpan fontSize="2rem" {...props}>
<Text as="span" fontSize="2rem" {...props}>
<Translation id="loading-error-refresh" />
</IndicatorSpan>
</Text>
)

export default StatErrorMessage
13 changes: 4 additions & 9 deletions src/components/StatLoadingMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from "react"
import styled from "@emotion/styled"
import { typography, TypographyProps } from "styled-system"
import { Text, TextProps } from "@chakra-ui/react"

import Translation from "./Translation"

export interface IProps extends TypographyProps {}

export const IndicatorSpan = styled.span<IProps>`
${typography}
`
export interface IProps extends TextProps {}

const StatLoadingMessage: React.FC<IProps> = (props) => (
<IndicatorSpan fontSize="2rem" {...props}>
<Text as="span" fontSize="2rem" {...props}>
<Translation id="loading" />
</IndicatorSpan>
</Text>
)

export default StatLoadingMessage