Skip to content

Instantly share code, notes, and snippets.

@taingmeng
Last active July 16, 2021 09:26
Show Gist options
  • Save taingmeng/38957873eb52ec8bb6aa85b68225ebc8 to your computer and use it in GitHub Desktop.
Save taingmeng/38957873eb52ec8bb6aa85b68225ebc8 to your computer and use it in GitHub Desktop.
YAGNI Example Overkill
export default {
baseUrl: "http://localhost:8080/api/v1",
termsOfUsePdfUrl: "/resources/pdf/termsOfUsePdfUrl.pdf",
};
import React from "react";
import { View } from "react-native";
import PDFViewer from '../components/PDFViewer';
import config from '../config';
const TermsOfUsePage = () => {
const { baseUrl, termsOfUsePdfUrl } = config;
return (
<View>
<PDFViewer file={{ url: `${baseUrl}/${termsOfUsePdfUrl}` }} />
</View>
);
}
export default TermsOfUsePage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment