Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Add single account details
Browse files Browse the repository at this point in the history
  • Loading branch information
sikelio committed Apr 21, 2023
1 parent d1e7443 commit 02eea5c
Show file tree
Hide file tree
Showing 6 changed files with 338 additions and 216 deletions.
6 changes: 6 additions & 0 deletions src/components/TabsStack.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Server from "../screens/Server";
import ServerManage from "../screens/ServerManage";
import EditServer from "../screens/EditServer";
import SessionManage from "../screens/SessionManage";
import SingleAccount from "../screens/SingleAccount";

const Stack = createNativeStackNavigator();

Expand All @@ -33,6 +34,11 @@ const ServerTabStack = () => {
component={ SessionManage }
options={({ route }) => ({ title: `Manage session - ${route.params.title}` })}
/>
<Stack.Screen
name="SingleAccount"
component={ SingleAccount }
options={({ route }) => ({ title: `User : ${route.params.title}` })}
/>
</Stack.Navigator>
);
}
Expand Down
14 changes: 14 additions & 0 deletions src/functions/SingleAccountUtilities.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const getCountryFlag = (countryCode) => {
let url;

switch (countryCode) {
case 'ko':
url = `https://flagcdn.com/16x12/kr.png`;
break;
default:
url = `https://flagcdn.com/16x12/${countryCode}.png`;
break;
}

return url;
};
Loading

0 comments on commit 02eea5c

Please sign in to comment.